package com.struts.web.job;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.struts.deal.job.Deal;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.lg.system.CLGAction;

public class ViewJobAction extends CLGAction {
     
	public ActionForward execute(ActionMapping actionMapping,
            ActionForm actionForm,
            HttpServletRequest request,
            HttpServletResponse response) throws
Exception {
		ViewJobForm  aWebForm = (ViewJobForm)actionForm;
		System.out.println("333333333333333333:"+aWebForm.getPositionText());
		
		if(aWebForm.getMethod()!=null && aWebForm.getMethod().equals("search")){
		Deal.viewJob(request,aWebForm);
		} 
		if(aWebForm.getMethod()!=null && aWebForm.getMethod().equals("hopsearch")){
		Deal.viewHopJob(request);
		}
		if(aWebForm.getMethod()!=null && aWebForm.getMethod().equals("allhopsearch")){
		Deal.hopSearchView(request);
		return actionMapping.findForward("hopsearchView");
		}
		return actionMapping.getInputForward();
}
}
